import { reactive, ref } from "vue"
function getImageUrl(name) {
    return new URL(`../assets/skin/${name}`, import.meta.url).href
  }
const skinList=[
    {
        url:getImageUrl("76295.png"),
        name:"天天爱消除"
    },
    {
        url:getImageUrl("87977.png"),
        name:"蔚蓝海洋"
    },
    {
        url:getImageUrl("83704.png"),
        name:"冷兔"
    },
    {
        url:getImageUrl("87951.png"),
        name:"粉色梦幻"
    },
   
    {
        url:getImageUrl("1593716.png"),
        name:"恋空"
    },
    {
        url:getImageUrl("87943.png"),
        name:"璀璨星雨"
    },{
        url:getImageUrl("87962.png"),
        name:"静谧星空"
    },
    {
        url:getImageUrl("87949.png"),
        name:"都市回忆"
    }
]
const index=localStorage.getItem("skinIndex")|0
const skinIndex=ref(index)
const currSkin=reactive({
    skin:{}
})
const setSkin=(index)=>{
    localStorage.setItem("skinIndex",index)
    skinIndex.value=index;
    currSkin.skin=skinList[index]
}
export {
    skinIndex,
    skinList,
    setSkin
}